<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


     <Import Condition="'$(MSBuildThisFileDirectory)' != '' And
                     HasTrailingSlash('$(MSBuildThisFileDirectory)') And
                     Exists('$(MSBuildThisFileDirectory)\Sustainalytics.CUDA.targets.user')"
          Project="$(MSBuildThisFileDirectory)\Sustainalytics.CUDA.targets.user" />
    
     <ItemGroup>
      <CudaInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
                                    HasTrailingSlash('$(MSBuildThisFileDirectory)')"
                          Include="$(MSBuildThisFileDirectory)**\*.*" />
    </ItemGroup>
  
  
    <ItemGroup Condition="'$(ContentCudaInteropFiles)' != '' And
                        '$(ContentCudaInteropFiles)' != 'false' And
                        '@(CudaInteropFiles)' != ''">
    <Content Include="@(CudaInteropFiles)">
      <Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  
  
  <Target Name="CopyCudaInteropFiles"
          Condition="'$(CopyCudaInteropFiles)' != 'false' And
                     '$(OutDir)' != '' And
                     HasTrailingSlash('$(OutDir)') And
                     Exists('$(OutDir)')"
          Inputs="@(CudaInteropFiles)"
          Outputs="@(CudaInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">
    <!--
        NOTE: Copy "Sustainalytics.ManagedCuda.dll" and all related files, for every
              architecture that we support, to the build output directory.
    -->
    <Copy SourceFiles="@(CudaInteropFiles)"
          DestinationFiles="@(CudaInteropFiles -> '$(OutDir)%(Filename)%(Extension)')" />
  </Target>
  
  
  
   <Target Name="CleanCudaInteropFiles"
          Condition="'$(CleanCudaInteropFiles)' != 'false' And
                     '$(OutDir)' != '' And
                     HasTrailingSlash('$(OutDir)') And
                     Exists('$(OutDir)')">

    <Delete Files="@(CudaInteropFiles -> '$(OutDir)%(Filename)%(Extension)')" />
  </Target>
  
  
   <Target Name="CollectCudaInteropFiles"
          Condition="'$(CollectCudaInteropFiles)' != 'false'">
    <ItemGroup>
      <FilesForPackagingFromProject Include="@(CudaInteropFiles)">
        <DestinationRelativePath>bin\%(Filename)%(Extension)</DestinationRelativePath>
      </FilesForPackagingFromProject>
    </ItemGroup>
  </Target>
  
  
   <PropertyGroup>
    <PostBuildEventDependsOn>
      $(PostBuildEventDependsOn);
      CopyCudaInteropFiles;
    </PostBuildEventDependsOn>
    <BuildDependsOn>
      $(BuildDependsOn);
      CopyCudaInteropFiles;
    </BuildDependsOn>
    <CleanDependsOn>
      $(CleanDependsOn);
      CleanCudaInteropFiles;
    </CleanDependsOn>
  </PropertyGroup>
  
  
  <PropertyGroup Condition="'$(VisualStudioVersion)' == '' Or
                            '$(VisualStudioVersion)' == '12.0' Or
                            '$(VisualStudioVersion)' == '14.0'">
    <PipelineCollectFilesPhaseDependsOn>
      CollectCudaInteropFiles;
      $(PipelineCollectFilesPhaseDependsOn);
    </PipelineCollectFilesPhaseDependsOn>
  </PropertyGroup>
  
  
</Project>